package ooday04;
import java.util.Timer;
import java.util.TimerTask;

public class TimerDemo {
    public static void main(String[] args) {
        Timer timer =new Timer();
        int interval=20000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("该敲代码啦！！！");
            }
        },interval,interval);
        /*
        Timer timer=new Timer();
        int interval =500;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("该练代码了......");

            }
        }
    ,interval,interval);


*/

    }
}
